package com.yunfeisoft.business.model;

import com.yunfeisoft.common.base.BaseModel;
import com.yunfeisoft.common.sql.record.TransientField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * ClassName: SocialParticipationEvaluation
 * Description: 社会参与能力评估表
 *
 * @Author: Jackie liu
 * Date: 2020-05-22
 */
@Entity
@Table(name = "TT_SOCIAL_PARTICIPATION_EVALUATION")
public class SocialParticipationEvaluation extends BaseModel implements Serializable {

    /**
     * Field serialVersionUID: 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 老人入住关联id
     */
    @Column
    private String elderId;

    @TransientField
    private String elderName;

    public String getElderName() {
        return elderName;
    }

    public void setElderName(String elderName) {
        this.elderName = elderName;
    }

    /**
     * 生活能力分数
     */
    @Column
    private Integer survivalAbilityScore;

    public String getSurvivalAbilityScoreStr () {
        if (survivalAbilityScore == null) {
            return null;
        }
        return SocialParticipationEvaluation.SurvivalAbilityScoreEnum.valueOf(survivalAbilityScore);
    }

    /**
     * 工作能力分数
     */
    @Column
    private Integer workAbilityScore;

    public String getWorkAbilityScoreStr () {
        if (workAbilityScore == null) {
            return null;
        }
        return SocialParticipationEvaluation.WorkAbilityScoreEnum.valueOf(workAbilityScore);
    }

    /**
     * 时间或空间定向分数
     */
    @Column
    private Integer timeSpaceOrientationScore;

    public String getTimeSpaceOrientationScoreStr () {
        if (timeSpaceOrientationScore == null) {
            return null;
        }
        return SocialParticipationEvaluation.TimeSpaceOrientationScoreEnum.valueOf(timeSpaceOrientationScore);
    }

    /**
     * 人物定向分数
     */
    @Column
    private Integer characterOrientationScore;

    public String getCharacterOrientationScoreStr () {
        if (characterOrientationScore == null) {
            return null;
        }
        return SocialParticipationEvaluation.CharacterOrientationScoreEnum.valueOf(characterOrientationScore);
    }

    /**
     * 社会交往能力分数
     */
    @Column
    private Integer socialCommunicationAbilityScore;

    public String getSocialCommunicationAbilityScoreStr () {
        if (socialCommunicationAbilityScore == null) {
            return null;
        }
        return SocialParticipationEvaluation.SocialCommunicationAbilityScoreEnum.valueOf(socialCommunicationAbilityScore);
    }

    /**
     * 社会参与等级
     */
    @Column
    private Integer level;

    public String getLevelStr () {
        if (level == null) {
            return null;
        }
        return SocialParticipationEvaluation.SocialLevelScoreEnum.valueOf(level);
    }


    public String getElderId() {
        return elderId;
    }

    public void setElderId(String elderId) {
        this.elderId = elderId;
    }

    public Integer getSurvivalAbilityScore() {
        return survivalAbilityScore;
    }

    public void setSurvivalAbilityScore(Integer survivalAbilityScore) {
        this.survivalAbilityScore = survivalAbilityScore;
    }

    public Integer getWorkAbilityScore() {
        return workAbilityScore;
    }

    public void setWorkAbilityScore(Integer workAbilityScore) {
        this.workAbilityScore = workAbilityScore;
    }

    public Integer getTimeSpaceOrientationScore() {
        return timeSpaceOrientationScore;
    }

    public void setTimeSpaceOrientationScore(Integer timeSpaceOrientationScore) {
        this.timeSpaceOrientationScore = timeSpaceOrientationScore;
    }

    public Integer getCharacterOrientationScore() {
        return characterOrientationScore;
    }

    public void setCharacterOrientationScore(Integer characterOrientationScore) {
        this.characterOrientationScore = characterOrientationScore;
    }

    public Integer getSocialCommunicationAbilityScore() {
        return socialCommunicationAbilityScore;
    }

    public void setSocialCommunicationAbilityScore(Integer socialCommunicationAbilityScore) {
        this.socialCommunicationAbilityScore = socialCommunicationAbilityScore;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }


    // 生活能力枚举类
    public enum SurvivalAbilityScoreEnum {
        FIRST(0, "除个人生活自理外（如饮食、洗漱、穿戴、二便），能料理家务（如做饭、洗衣）或当家管理事务"),
        SECOND(1, "除个人生活自理外，能做家务，但欠好，家庭事务安排欠条理"),
        THIRD(2, "个人生活能自理；只有在他人帮助下才能做些家务，但质量不好"),
        FORTH(3, "个人基本生活事务能自理（如饮食、二便），在督促下可洗漱"),
        FIFTH(4, "个人基本生活事务（如饮食、二便）需要部分帮助或完全依赖他人帮助");
        private int value;
        private String label;

        private SurvivalAbilityScoreEnum(int value, String label) {
            this.value = value;
            this.label = label;
        }

        public static String valueOf(Integer value) {
            if (value == null) {
                return null;
            }
            SocialParticipationEvaluation.SurvivalAbilityScoreEnum[] values = SocialParticipationEvaluation.SurvivalAbilityScoreEnum.values();
            for (SocialParticipationEvaluation.SurvivalAbilityScoreEnum loop : values) {
                if (value == loop.getValue()) {
                    return loop.getLabel();
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

        public String getLabel() {
            return label;
        }
    }

    // 工作能力枚举类
    public enum WorkAbilityScoreEnum {
        FIRST(0, "原来熟练的脑力工作或体力技巧性工作可照常进行"),
        SECOND(1, "原来熟练的脑力工作或体力技巧性工作能力有所下降"),
        THIRD(2, "原来熟练的脑力工作或体力技巧性工作明显不如以往，部分遗忘"),
        FORTH(3, "对熟练工作只有一些片段保留，技能全部遗忘"),
        FIFTH(4, "对以往的知识或技能全部磨灭");
        private int value;
        private String label;

        private WorkAbilityScoreEnum(int value, String label) {
            this.value = value;
            this.label = label;
        }

        public static String valueOf(Integer value) {
            if (value == null) {
                return null;
            }
            SocialParticipationEvaluation.WorkAbilityScoreEnum[] values = SocialParticipationEvaluation.WorkAbilityScoreEnum.values();
            for (SocialParticipationEvaluation.WorkAbilityScoreEnum loop : values) {
                if (value == loop.getValue()) {
                    return loop.getLabel();
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

        public String getLabel() {
            return label;
        }
    }

    // 时间或空间定向枚举类
    public enum TimeSpaceOrientationScoreEnum {
        FIRST(0, "时间观念（年、月、日、时）清楚；可单独出远门，能很快掌握新环境的方位"),
        SECOND(1, "时间观念有些下降，年、月、日清楚，但有时相差几天；可单独来往于近街，知道现住地的名称和方位，但不知回家路线"),
        THIRD(2, "时间观念较差，年、月、日不清楚，可知上半年或下半年；只能单独在家附近行动，对现住地只知名称，不知道方位"),
        FORTH(3, "时间观念很差，年、月、日不清楚，可知上午或下午；只能在左邻右舍间串门，对现住地不知名称和方位"),
        FIFTH(4, "无时间观念；不能单独外出");
        private int value;
        private String label;

        private TimeSpaceOrientationScoreEnum(int value, String label) {
            this.value = value;
            this.label = label;
        }

        public static String valueOf(Integer value) {
            if (value == null) {
                return null;
            }
            SocialParticipationEvaluation.TimeSpaceOrientationScoreEnum[] values = SocialParticipationEvaluation.TimeSpaceOrientationScoreEnum.values();
            for (SocialParticipationEvaluation.TimeSpaceOrientationScoreEnum loop : values) {
                if (value == loop.getValue()) {
                    return loop.getLabel();
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

        public String getLabel() {
            return label;
        }
    }

    // 人物定向枚举类
    public enum CharacterOrientationScoreEnum {
        FIRST(0, "知道周围人们的关系，知道祖孙、叔伯、姑姨、侄子侄女等称谓的意义；可分辨陌生人的大致年龄和身份，可用适当称呼"),
        SECOND(1, "只知家中亲密近亲的关系，不会分辨陌生人的大致年龄，不能称呼陌生人"),
        THIRD(2, "只能称呼家中人，或只能照样称呼，不知其关系，不辨辈分"),
        FORTH(3, "只认识常同住的亲人，可称呼子女或孙子女，可辨熟人和生人"),
        FIFTH(4, "只认识保护人，不辨熟人和生人");
        private int value;
        private String label;

        private CharacterOrientationScoreEnum(int value, String label) {
            this.value = value;
            this.label = label;
        }

        public static String valueOf(Integer value) {
            if (value == null) {
                return null;
            }
            SocialParticipationEvaluation.CharacterOrientationScoreEnum[] values = SocialParticipationEvaluation.CharacterOrientationScoreEnum.values();
            for (SocialParticipationEvaluation.CharacterOrientationScoreEnum loop : values) {
                if (value == loop.getValue()) {
                    return loop.getLabel();
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

        public String getLabel() {
            return label;
        }
    }

    // 社会交往能力枚举类
    public enum SocialCommunicationAbilityScoreEnum {
        FIRST(0, "参与社会，在社会环境有一定的适应能力，待人接物恰当"),
        SECOND(1, "能适应单纯环境，主动接触人，初见面时难让人发现智力问题，不能理解隐喻语"),
        THIRD(2, "脱离社会，可被动接触不会主动待人，谈话中很多不适词句，容易上当受骗"),
        FORTH(3, "勉强可与人交往，谈吐内容不清楚，表情不恰当"),
        FIFTH(4, "难以与人接触");
        private int value;
        private String label;

        private SocialCommunicationAbilityScoreEnum(int value, String label) {
            this.value = value;
            this.label = label;
        }

        public static String valueOf(Integer value) {
            if (value == null) {
                return null;
            }
            SocialParticipationEvaluation.SocialCommunicationAbilityScoreEnum[] values = SocialParticipationEvaluation.SocialCommunicationAbilityScoreEnum.values();
            for (SocialParticipationEvaluation.SocialCommunicationAbilityScoreEnum loop : values) {
                if (value == loop.getValue()) {
                    return loop.getLabel();
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

        public String getLabel() {
            return label;
        }
    }

    // 社会参与分级枚举类
    public enum SocialLevelScoreEnum {
        FIRST(0, "能力完好"),
        SECOND(1, "轻度受损"),
        THIRD(2, "中度受损"),
        FORTH(3, "重度受损");
        private int value;
        private String label;

        private SocialLevelScoreEnum(int value, String label) {
            this.value = value;
            this.label = label;
        }

        public static String valueOf(Integer value) {
            if (value == null) {
                return null;
            }
            SocialParticipationEvaluation.SocialLevelScoreEnum[] values = SocialParticipationEvaluation.SocialLevelScoreEnum.values();
            for (SocialParticipationEvaluation.SocialLevelScoreEnum loop : values) {
                if (value == loop.getValue()) {
                    return loop.getLabel();
                }
            }
            return null;
        }

        public Integer getValue() {
            return value;
        }

        public String getLabel() {
            return label;
        }
    }

}